package com.yuyou.fn.educational.service;

import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.educational.entity.CourseClass;
import com.github.wens.framework.service.ISuperService;
import com.yuyou.fn.educational.vo.ArrangeClassTimeResultVo;
import com.yuyou.fn.educational.vo.CourseClassQueryVo;
import com.yuyou.fn.educational.vo.CourseClassSaveOrUpdateVo;

import java.util.List;

/**
 *
 * CourseClass 表数据服务层接口
 *
 */
public interface ICourseClassService extends ISuperService<CourseClass,Long> {


    Page<CourseClass> findCourseClassByQueryForPage(CourseClassQueryVo courseClassQueryVo, int pageNo, int pageSize);

    void saveOrUpdateCourseClass(CourseClassSaveOrUpdateVo courseClassSaveOrUpdateVo);

     String findCourseNameById(Long classId);

    CourseClass findBaseCourseClass(Long classId);

    void saveArrangementRoom(Long classId, Long roomId);

    //设置班级教师并且生成讲次对象
    void saveArrangementTeacher(Long classId, List<Long> teacherIds);


    //报名人数减一
    boolean decreaseRegAmount(Long classId);

    void saveArrangeClassTimeResult(Long classId , List<ArrangeClassTimeResultVo> arrangeClassTimeResultList);


    void changeStatus(List<Long> classIds, Integer status);

    boolean increaseRegAmount(Long classId, Integer nowRegAmount);

    boolean updateCompletedLectureAmount(Long classId, Integer completedLectureAmount);

    void recommendCourseClass(List<Long> classIds, Integer isRecommend);

}